import 'package:flutter/material.dart';

class Page3 extends StatefulWidget {
  Page3({Key key}) : super(key: key);

  _Page3State createState() => _Page3State();
}

class _Page3State extends State<Page3> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Page3'),
      ),
      body: ListView(
        children: <Widget>[
          ListTile(
            title: Text('我是Page3页面'),
            onTap: () {
              Navigator.of(context).pushNamed('/page4');
              // Navigator.push(
              //   context,
              //   new MaterialPageRoute(
              //     builder: (BuildContext context) => Page4(),
              //   ),
              // );
            },
          ),
        ],
      ),
    );
  }
}
